3D computer figures are conventionally expressed by using simple geometric primitives such as points, lines and triangles to approximate to complex geometric shapes. Conventional hardware for computer graphics are optimized so as to process such simple primitives rapidly, especially triangle meshes. Therefore, conventional hardware for computer graphics can realize approximation to complex shapes by using various triangles, lines and points.
Generally, in addition to vertex buffer to store vertex data, an index buffer to store reference data to each vertex data per primitive is provided in a GPU (graphics processing unit) to process 3D computer figures. The index buffer accelerates vertex data processing. The vertex data according to primitives stored in the index buffer are sent to shader pipeline composed of stages, such as a vertex shader, geometry shader and pixel shader, as input data and then image processing is performed. For example, such common structure of GPU is illustrated in Patent document 1.
In case of handling primitives that have variable data sizes (i.e. primitives except triangles) in the GPU that has the structure mentioned above, special handling is necessary. Because the sizes of the primitives to be stored in the index buffer are different, so it is necessary to figure out which part of the index buffer corresponds to the vertices constituting each primitive. Therefore, for example, a method that the size of each primitive is stored in the head of index sequence for the primitive and the primitive itself is determined by reading the index sequence head is used.